#include "QtUI/UICommandBase.qth"
#include "QtUI/UICommandBase.moh"

namespace QtUI
{

UICommandBase::UICommandBase( QAction* boundAction )
	: pAction_( boundAction)
{
	connect( pAction_, SIGNAL( triggered( bool)), this, SLOT( handleExecute( bool)));
}

// ---------------------------------------------------------------------------------------------------------------------
UICommandBase::~UICommandBase()
{
	this->disconnect();
	pAction_->disconnect();
	delete pAction_;
}

// ---------------------------------------------------------------------------------------------------------------------
void UICommandBase::handleExecute( bool checked /*= false*/ )
{
	this->execute( checked);
}


} // namespace QtUI
